﻿// (c) Copyright Fernando Cerqueira.
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved.

using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using Microsoft.VisualStudio.PlatformUI;
using AppRes = WindowsPhoneCommands.Resources;

// ReSharper disable CheckNamespace
namespace WindowsPhoneCommands
// ReSharper restore CheckNamespace
{
    /// <summary>
    /// Interaction logic for XapDeploy.xaml
    /// </summary>
    // ReSharper disable RedundantExtendsListEntry
    public partial class PwdDialog : DialogWindow
    // ReSharper restore RedundantExtendsListEntry
    {
        public string Key;

        public PwdDialog()
        {
            InitializeComponent();
            Background = VsTheming.GetDialogBackground();
            Foreground = VsTheming.GetWindowText();
            Title = AppRes.ToolWindowTitle;
            Loaded += PwdDialogLoaded;
        }

        private void PwdDialogLoaded(object sender, RoutedEventArgs e)
        {
            TxtKey.Focus();
        }

        private void BntOkClick(object sender, RoutedEventArgs e)
        {
            Key = TxtKey.Password;
            Close();
        }
    }
}
